package com.dushibao.service.impl;

import com.dushibao.dao.WebSiteDao;
import com.dushibao.entity.WebSite;
import com.dushibao.service.WebsiteService;

public class WebsiteServiceImpl implements WebsiteService {
    WebSiteDao webSiteDao = new WebSiteDao();

    @Override
    public WebSite getOne() {
        return webSiteDao.getOne();
    }

    @Override
    public Integer saveOrUpdate(WebSite webSite) {
        if(webSite.getId()==null){
            return webSiteDao.save(webSite);
        }
        return webSiteDao.update(webSite);
    }
}
